<html>
<body>
<?php
$root = 'w';
$id = str_replace(" ", "_", $_GET['id']);
?>
Hi <?php echo $id; ?>.
Your merge history graphs are these:<br>
<?php $time = time() ?>
<a href=<?php echo "$root/" . $id . "/$time" ?>/svgs/b.svg>b.svg</a><br>
<a href=<?php echo "$root/" . $id . "/$time" ?>/svgs/b-curved.svg>b-curved.svg</a><br>
<a href=<?php echo "$root/" . $id . "/$time" ?>/svgs/bslim.svg>bslim.svg</a><br>
<a href=<?php echo "$root/" . $id . "/$time" ?>/svgs/bslim-curved.svg>bslim-curved.svg</a><br>
<a href=<?php echo "$root/" . $id . "/$time" ?>/svgs/bslim5.svg>bslim5.svg</a><br>
<a href=<?php echo "$root/" . $id . "/$time" ?>/svgs/bslim5-curved.svg>bslim5-curved.svg</a><br>
<pre>
<?php
$workdir = "$root/" . $id . "/$time";
mkdir($workdir, 0777, true);
$f = fopen("$workdir/branches.txt", 'w');
fputs($f, $_GET['branches']);
fclose($f);
$starttime = time();
$bindir = getcwd();
system("cd $workdir && perl -I$bindir $bindir/process_branches.pl");
$endtime = time();
$timetaken = $endtime - $starttime;
?>
<br>
Runtime: <?php echo $timetaken ?> seconds<br>
</pre>
</body>
</html>
